(function($, undefined) {
	$.fn.staff = function(options) {
		var settings = {
			fid : 0
		};
		if (options) {
			$.extend(settings, options);
		}
		var obj = this;
		var level = 2;
		var fid = 0;
		$(obj).change(function() {
			$("div.brands").html("");
		});
		function getBrands(fid) {
			level = $(obj).val();
			if (level == 3) {
				// 获取数据
				$("#brands_floor_" + fid).html("");

				$.getJSON(setting.url + "/getBrands/fid/" + fid + "/uid/"
						+ settings.uid, function(data) {
					if (data.status == 1) {
						$("div.brands").html("");
						$("#brands_floor_" + fid).html(data.data);
					}
				});
			}
		}
		$("input.floor").click(function() {
			fid = $(this).val();
			getBrands(fid);
		});
		if (settings.fid != 0) {
			getBrands(settings.fid);
		}
	};
}(jQuery));